projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c985c57
)
GtkPopover: avoid a critical
author
Matthias Clasen
<mclasen@redhat.com>
Thu, 30 Jan 2014 13:11:41 +0000
(08:11 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Thu, 30 Jan 2014 13:13:05 +0000
(08:13 -0500)
focus_widget can be NULL, as pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=723181#c7
gtk/gtkpopover.c
patch
|
blob
|
history
diff --git
a/gtk/gtkpopover.c
b/gtk/gtkpopover.c
index b9dd81123e441c318d48284f358cc7dfbc42b4cf..378fb2cee566d667e4e725966df3f02c8121731d 100644
(file)
--- a/
gtk/gtkpopover.c
+++ b/
gtk/gtkpopover.c
@@
-246,7
+246,9
@@
gtk_popover_apply_modality (GtkPopover *popover,
GtkWidget *prev_focus;
prev_focus = gtk_window_get_focus (priv->window);
- priv->prev_focus_widget = g_object_ref (prev_focus);
+ priv->prev_focus_widget = prev_focus;
+ if (priv->prev_focus_widget)
+ g_object_ref (prev_focus);
gtk_grab_add (GTK_WIDGET (popover));
gtk_widget_grab_focus (GTK_WIDGET (popover));
}